Ext.define('TS.view.general.user.Form', {
    extend: 'TS.lib.Form',
    alias : 'widget.userform',
    title : 'Uztkownik',
	url:URL.general.form.user,
	items:[
		{xtype:'hidden',name:'user_id'},
		{xtype:'text',fieldLabel:'user_login',name:'user_login'},
		{xtype:'text',fieldLabel:'user_password',name:'user_password'},
		{xtype:'combo',fieldLabel:'denomination_id',name:'denomination_id',store:Dict.denomination},
		{xtype:'text',fieldLabel:'user_firstname',name:'user_firstname'},
		{xtype:'text',fieldLabel:'user_lastname',name:'user_lastname'},
		{xtype:'date',fieldLabel:'user_birthday',name:'user_birthday'},
		{xtype:'text',fieldLabel:'user_occupation',name:'user_occupation',b:1},
		{xtype:'text',fieldLabel:'user_town',name:'user_town',b:1},
		{xtype:'combo',fieldLabel:'acl_role_id',name:'acl_role_id',store:Dict.aclrole},
		{xtype:'check',fieldLabel:'user_active',name:'user_active'}
        
	],
	buttons:[{
		text:'Zapisz',
		handler:Util.f.save,
		callback:function(){
			Dict.user.load();
			Util.store('User').load();
		}
	},{
		text:'Nowy',
		handler:Util.f.clear
	},{
		text:'Usuń',
		handler:Util.f.del,
		handlerConfig:{
			url:URL.general.del.user
		}
	}]
});